import React, { memo, useState } from "react";

const App = memo(() => {
  const [message, setMessage] = useState("hello word");

  function changeText(params) {
    setMessage("你好，oscar");
  }
  return (
    <div>
      <h1>useState:{message}</h1>
      <button onClick={() => changeText()}>修改文本</button>
    </div>
  );
});

export default App;
